﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TianShu.Domain.Shared
{
    public class QueryConditional
    {
        public QueryConditionalKeyEnum Key { get; set; }
        public Conditional Value { get; set; }
    }

    public class Conditional
    {
        public string FieldName { get; set; }
        public string FieldValue { get; set; }
        public QueryConditionalType ConditionalType { get; set; }
    }

    public enum QueryConditionalType
    {
        Equal = 0,
        Like = 1,
        GreaterThan = 2,
        GreaterThanOrEqual = 3,
        LessThan = 4,
        LessThanOrEqual = 5,
        In = 6,
        NotIn = 7,
        LikeLeft = 8,
        LikeRight = 9,
        NoEqual = 10,
        IsNullOrEmpty = 11,
        IsNot = 12,
        NoLike = 13,
        EqualNull = 14,
        InLike = 15
    }
    public enum QueryConditionalKeyEnum
    {
        /// <summary>
        /// and查询
        /// </summary>
        And=0,
        /// <summary>
        /// or查询
        /// </summary>
        Or=1,
        /// <summary>
        /// 空的
        /// </summary>
        Null=-1,
    }
}
